/**
 * Copyright (C), 2020, Y2 T205
 * FileName: WmsFeignService
 * Author: Lenovo
 * Date: 2020-05-28 10:19
 * Description: 远程调用库存系统
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */


package com.atguigu.gulimall.order.feign;


import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 〈一句话功能简述〉<br>
 * 〈远程调用库存系统〉
 *
 * @author Lenovo
 * @create 2020-05-28
 * @since 1.0.0
 */
@FeignClient("gulimall-ware")
public interface WmsFeignService {

    /*查询sku是否有库存*/
    @PostMapping("/ware/waresku/hasstock")
    R getSkusHasStock(@RequestBody List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fare")
     R getFare(@RequestParam("addrId") Long addrId);

    /*锁库存的请求*/
    @PostMapping("/ware/waresku/lock/order")
     R orderLockStock(@RequestBody WareSkuLockVo vo);


}
